package com.flyme.gateway.provider.controller;


import com.flyme.common.core.model.ResultBody;
import com.flyme.common.core.utils.IpInfoUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 公共方法
 */
@RestController
@Api(description = "公共方法")
@RequestMapping("/common")
public class IpInfoController {

   /* @Autowired
    private IpInfoUtil ipInfoUtil;

    @RequestMapping(value = "/ipinfo", method = RequestMethod.GET)
    @ApiOperation(value = "IP及天气相关信息")
    public ResultBody<Object> upload(HttpServletRequest request) {
        String result = ipInfoUtil.getIpWeatherInfo(ipInfoUtil.getIpAddr(request));
        return ResultBody.success().setData(result);
    }*/
}